require.config({
    paths:{
        'backbone':'./libs/backbone',
        'underscore':'./libs/underscore',
        'jquery':'./libs/jquery',
        'text':'./libs/text',
        'css':'./libs/css',
        'jweixin-1.0.0':'./libs/jweixin-1.0.0', // 微信jssdk
        'qqMap':'./libs/qqMapjs', // 腾讯地图模块
        'cookie':'./libs/cookie'
    }
});
require(['backbone'],function (Backbone) {
    var Router = Backbone.Router.extend({
        routes:{
            '':'home',
           'home':'home',
           'city':'city',
           'mine':'mine',
           'clothes':'clothes',
           'collect':'collect'
        },
        home:function () {
           require(['jquery','text!./home/home.html','css!./home/css/home.css','css!./libs/reset.css'],function ($,html) {
               $('.content').html(html);
           })
       },
        mine:function () {
           require(['jquery','text!./mine/mine.html','css!./mine/css/mine.css','css!./libs/reset.css'],function ($,html) {
               $('.content').html(html);
           })
       },
       city:function () {
          require(['jquery','text!./city/city.html','css!./city/css/city.css','css!./libs/reset.css'],function ($,html) {
              $('.content').html(html);
          })
      },
      clothes:function () {
         require(['jquery','text!./clothes/clothes.html','css!./clothes/css/clothes.css','css!./libs/reset.css'],function ($,html) {
             $('.content').html(html);
         })
     },
     collect:function () {
        require(['jquery','text!./collect/collect.html','css!./collect/css/collect.css','css!./libs/reset.css'],function ($,html) {
            $('.content').html(html);
        })
    },
    });
    //启动路由
    var router = new Router();
    //路由监听
    Backbone.history.start();
})
